﻿using System.Runtime.Serialization;
using System.ServiceModel;
using ISSMoviePlex.BLL;

namespace ISSMoviePlex.Service
{
    [ServiceContract]
    public interface IAccountService
    {
        [OperationContract]
        [FaultContract(typeof(AuthorizationFault))]
        bool AuthorizeUser(string password, string userName, bool isRemember, AccountBLL.Role role);

        [OperationContract]
        void LogOut();

        [OperationContract]
        [FaultContract(typeof(AuthorizationFault))]
        void ChangePassword(string userName, string oldPassword, string newPassword, string confirmPassword);
    }

    [DataContract]
    public class AuthorizationFault
    {
        [DataMember]
        public string Operation { get; set; }
        [DataMember]
        public string ProblemType { get; set; }
    }
}